@layout("/common/container.html", {"title" : "用户管理", "plugin": "jstree"}){
<form class="e-form">
    <div class="card">
        <#card:head title="用户管理" icon="la la-user"/>
        <input type="hidden" id="id" name="id" value="${object.id}">
        <input type="hidden" id="deptId" name="deptId" value="${object.deptId}">
        <input type="hidden" id="roles" name="roles" value="${object.roles}">
        <div class="card-body">
            <div class="row">
                <div class="col-md-6 col-12">
                    <#form:input id="username" value="${object.username}" name="用户名" required="true"/>
                    @if(object.id == null){
                    <#form:input id="password" value="${object.password}" name="密码" type="text" required="true"/>
                    @}
                    <#form:input id="nickname" value="${object.nickname}" name="昵称"/>
                    <div class="form-group row">
                        <label class="col-4 col-form-label">
                            <span class="required">*</span>
                            状态：
                        </label>
                        <div class="col-8">
                            <div class="radio-dict" data-dict-type="commonStatus" data-value="${object.status}" data-name="status" data-required="true"></div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-12">
                    <div class="form-group row">
                        <label class="col-4 col-form-label">
                            角色：
                        </label>
                        <div class="col-8">
                            <div class="e-scrollable" data-scrollable="true" style="max-height: 400px">
                                <div id="roles-tree"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="card-foot">
            <div class="e-form-actions text-center">
                <#btn btnType="success" btnClass="" name="保存" icon="la la-save" click="mUserInput.save(this)" permission="sys:user:save"/>
            </div>
        </div>
    </div>
</form>
<!--begin::页面脚本 -->
<#script src="static/modular/sys/user/input.js" />
<!--end::页面脚本 -->
@}